﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display.DialogUI {
    import flash.display.*;
    import flash.utils.*;
    import Classes.util.*;

    public class GenericPictureDialog extends GenericDialog {

        protected var numAssetsLeft:int = 2;
        protected var m_acceptTextName:String;
        protected var m_imagePath:String;
        protected var m_bg:DisplayObject;

        public function GenericPictureDialog(_arg1:String, _arg2:String="", _arg3:int=0, _arg4:Function=null, _arg5:String="", _arg6:String="", _arg7:Boolean=true, _arg8:int=0, _arg9:String="SendEmails", _arg10:String=""){
            this.m_acceptTextName = _arg9;
            this.m_imagePath = _arg10;
            super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
        }
        override protected function loadAssets():void{
            Global.delayedAssets.get(DelayedAssetLoader.GENERIC_DIALOG_ASSETS, this.onLoadDialogAssets);
            Global.delayedAssets.get(this.m_imagePath, this.onLoadPictureAsset);
        }
        override protected function createAssetDict():Dictionary{
            var _local1:Dictionary = new Dictionary();
            _local1["dialog_bg"] = (new m_comObject.dialog_bg_picture() as DisplayObject);
            _local1["image"] = this.m_bg;
            return (_local1);
        }
        override protected function createDialogView(_arg1:Dictionary):GenericDialogView{
            var _local2:GenericPictureDialogView = new GenericPictureDialogView(_arg1, m_message, m_dialogTitle, m_type, m_callback, m_icon, m_iconPos, this.m_acceptTextName);
            return (_local2);
        }
        protected function onLoadDialogAssets(_arg1:DisplayObject, _arg2:String):void{
            m_comObject = _arg1;
            this.checkAssetsLoaded();
        }
        protected function onLoadPictureAsset(_arg1:DisplayObject, _arg2:String):void{
            this.m_bg = _arg1;
            this.checkAssetsLoaded();
        }
        protected function checkAssetsLoaded():void{
            if (--this.numAssetsLeft == 0){
                onAssetsLoaded();
            };
        }

    }
}//package Display.DialogUI 
